﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" MasterPageFile="~/Lapv.Master"
    CodeBehind="NewsAdd.aspx.cs" Inherits="Lapv.page.NewsAdd" %>

<%@ Register TagPrefix="editor" Assembly="WYSIWYGEditor" Namespace="InnovaStudio" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <%--<script src="../styles/js/jquery-ui.min.js" type="text/javascript"></script>--%>

    <script src="../styles/js/jquery-1.4.2.min.js" type="text/javascript"></script>

    <script src="../styles/js/jquery.jdpicker.js" type="text/javascript"></script>

    <link href="../styles/css/jdpicker.css" rel="stylesheet" type="text/css" />

    <script src="../styles/js/CalenderExtra.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        var statusnews = '<%=StatusNews %>';
        $(document).ready(function() {
            if (statusnews == 2) {
                $('#clock').removeClass("none");
                $('#clock').addClass("block");
            }
            else {
                $('#clock').removeClass("block");
                $('#clock').addClass("none");
            }

        });
        function checkStatus(st) {
            if (st == 2) {
                $('#clock').removeClass("none");
                $('#clock').addClass("block");
            }
            else {
                $('#clock').removeClass("block");
                $('#clock').addClass("none");
            }


        }
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="header" runat="server">
    <%--menu tab  --%>
    <div class="tabnav">
        <ul>
            <li><a href="NewsManager.aspx" class="list_t">D/S Tin tức</a></li>
            <li class="active"><a href="NewsAdd.aspx" class="add_d">Thêm tin tức</a></li>
            <li><a href="catemanager.aspx" class="list_t">D/S danh mục</a></li>
        </ul>
        <div class="clr">
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
    <%--form1 add & edit--%>
    <div class="form form1">
        <div>
            <span>Chọn danh mục tin</span>
            <asp:DropDownList ID="ddlCate" runat="server">
            </asp:DropDownList>
        </div>
        <div>
            <span>Tiêu đề</span>
            <div>
                <asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>
            </div>
        </div>
        <div>
            <span>Mô tả ngắn</span>
            <div>
                <asp:TextBox ID="txtShortDes" runat="server" TextMode="MultiLine"></asp:TextBox>
            </div>
        </div>
        <div>
            <span>Nội dung</span>
            <div>
                <editor:WYSIWYGEditor runat="server" scriptPath="../scripts/" ID="txtContent" Width="500" />
            </div>
        </div>
        <div>
            <span>Hình ảnh</span>
            <div>
                <asp:TextBox ID="txtImage" runat="server"></asp:TextBox>
            </div>
        </div>
        <div>
            <span>Lượt xem</span>
            <div>
                <asp:TextBox ID="txtViewCount" runat="server"></asp:TextBox>
            </div>
        </div>
        <div>
            <span>Trạng thái</span>
            <div>
                <select id="rblStatus" runat="server" onchange="checkStatus(this.value);">
                    <option value="1">Dùng ngay</option>
                    <option value="2">Chờ đăng</option>
                    <option value="0">Không dùng</option>
                </select>
             
            </div>
        </div>
        <div id="clock" class="none">
            <span>Hẹn giờ đăng</span>
            <div>
                <input type="text" id="txtCLock" runat="server" class="ip_date" />
                <asp:TextBox ID="txtHour" runat="server" Width="50px" CssClass=""></asp:TextBox>
                <asp:TextBox ID="txtMinute" runat="server" Width="50px"></asp:TextBox>
            </div>
        </div>
        <div>
            <span>Cho phép xóa</span>
            <div>
                <asp:RadioButtonList ID="rblAllowDelete" runat="server" Width="143px">
                    <asp:ListItem Selected="True" Value="true">Được xóa</asp:ListItem>
                    <asp:ListItem Value="false">Không xóa</asp:ListItem>
                </asp:RadioButtonList>
            </div>
        </div>
        <div>
            <span>Vị trí tin</span>
            <div>
                <asp:DropDownList ID="ddlPosition" runat="server" Width="147px">
                    <asp:ListItem Value="100" Text="Tiêu biểu"></asp:ListItem>
                    <asp:ListItem Value="1" Text="Ngay sau tin tiêu biểu"></asp:ListItem>
                    <asp:ListItem Selected="True" Value="0" Text="Tin thường"></asp:ListItem>
                </asp:DropDownList>
            </div>
        </div>
        <div>
            <span></span>
            <div>
                <asp:Button ID="btnAdd" runat="server" Text="Lưu" OnClick="Submit" />
                <asp:Button ID="btnCancel" runat="server" Text="Hủy" OnClick="Cancel" />
            </div>
        </div>
    </div>

    <script type="text/javascript" language="javascript">
        var _currLanguage = "vi-VN";

        var clockDate = '<%=txtCLock.ClientID%>';

        $(document).ready(function() {
            CalenderExtra(_currLanguage, clockDate);
        });
    </script>

</asp:Content>
